]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupSwitchMenuItem: Emit correct switch state with toggled signal
authorAndrew Zaech <azaech021@gmail.com>
Sun, 29 Sep 2024 22:43:15 +0000 (22:43 +0000)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Oct 2024 16:50:17 +0000 (18:50 +0200)
The toggled signal was incorrectly emitting the pspec instead of the switch state.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3493>
(cherry picked from commit 7fe05f6bc9854f46f17c6db42ab9e9c3e9b4810c)

js/ui/popupMenu.js

index cf0406ca7b2f476e513632f51be368cbf3608d9b..e0693709ad6f190ec9c605f9f0a14a8b51eebb29 100644 (file)
@@ -607,8 +607,8 @@ export const PopupSwitchMenuItem = GObject.registerClass({
         this.checkAccessibleState();
     }
 
-    _onToggled(sw, state) {
-        this.emit('toggled', state);
+    _onToggled() {
+        this.emit('toggled', this._switch.state);
         this.checkAccessibleState();
     }